<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script type="text/javascript" src="../js/angular.min.js"></script>
	</head>
	<body >
		<div ng-app="myapp" ng-controller="myctlr">
			<div>
			<input type="text" name="name" ng-model="name" />
			<input type="button" value="清空" ng-click="clear()" />
		</div>
		<div>
			hello,<span ng-bind="name"></span>
		</div>
		</div>
		<script type="text/javascript" >
			var myapp=angular.module("myapp",[]);
			myapp.controller("myctlr",["$scope",function($scope){
				$scope.name="王昊";
				$scope.clear=function(){
					$scope.name="";
				}
			}])
		</script>
	</body>
</html>
